package com.itheima.project.face.impl;

import com.itheima.project.adapter.NativePayAdapter;
import com.itheima.project.exception.ProjectException;
import com.itheima.project.face.NativePayFace;
import com.itheima.project.vo.trade.RefundRecordVo;
import com.itheima.project.vo.trade.TradingVo;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName NativePayFaceImpl.java
 * @Description Native支付方式Face接口
 */
@Slf4j
@Component
public class NativePayFaceImpl implements NativePayFace {

    @Autowired
    NativePayAdapter nativePayAdapter;

    @Override
    public String queryQrCodeUrl(Long orderNo) throws ProjectException {
        return nativePayAdapter.queryQrCodeUrl(orderNo);
    }

    @Override
    @Transactional
    public TradingVo createDownLineTrading(TradingVo tradingVo) throws ProjectException {
        return nativePayAdapter.createDownLineTrading(tradingVo);
    }


}
